<?php

function profile_state_validation($form) {
  chkbadchar($form['title']['#value'], $form['title']['#title'], 'title');
  chkbadchar($form['field_tn_population']['und'][0]['value']['#value'], $form['field_tn_population']['und'][0]['value']['#title'], 'field_tn_population');
  chkbadchar($form['field_tn_capital']['und'][0]['value']['#value'], $form['field_tn_capital']['und'][0]['value']['#title'], 'field_tn_capital');
  chkbadchar($form['field_tn_languages']['und'][0]['value']['#value'], $form['field_tn_languages']['und'][0]['value']['#title'], 'field_tn_languages');
}